// createRouter：创建router实例对象
// createWebHistory：创建history模式的路由

import { createRouter, createWebHashHistory } from 'vue-router'
import giftPage from '@/views/page1.vue'
import startPage from '@/views/startPage.vue'

const router = createRouter({
  history: createWebHashHistory(),
  // path和component对应关系的位置
  routes: [
    {
      path: '/',
      component: startPage,
    },
    {
      path: '/gift',
      component: giftPage,
    }
  ]
})

export default router